<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //异步函数   该函数的执行结果, 决定『状态』
        async function fn(){
            //1. 非 promise 数据
            // return 123;
            //2. 返回是 promise 对象
            return new Promise((resolve, reject) => {
                resolve('ok');
                // reject('error');
            });
            //3. 抛出错误
            // throw 123;
        }

        console.log(fn());
    </script>
</body>
</html>